Ship PUT end to end - #96
Open
ru13r wants to merge 5 commits into
Open
Conversation
Adds updateUser(id, { name, email }) to db/store.js, mirroring the
existing getUserById/createUser conventions, to support the upcoming
PUT /users/:id endpoint.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a route to update an existing user, validating required fields (400) and returning 404 when the user doesn't exist, following the same conventions as the existing GET/POST routes. All tests in tests/update-user.test.js now pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Write-up covering the plan, model choice (Claude Sonnet 5), commit split, and review for the PUT /users/:id feature. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Check user existence before body validation so an unknown id always returns 404 regardless of body shape, and require name/email to be non-blank strings so non-string values and whitespace-only input are rejected instead of silently persisted. Findings from a pre-push code review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restructure NOTES.md to directly answer the plan/model/commits/review questions, including the mid-planning revision (adding a per-commit workflow) and the pre-push review findings and fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.